var msq = require("./mysql");
var fsql = (url, username, password, library, sql) =>
  new Promise((reslove, reject) => {
    msq.open(url, username, password, library);
    msq.handleData(
      sql,
      null,
      (result) => {
        msq.close();

        reslove(result);
      },
      (err) => {
        msq.close();
        console.log(err);
        reject(err);
      }
    );
  });
module.exports = (sql) =>
  fsql("localhost", "root", "20000221", "tc_egg", sql);
